$(document).ready(function(){
	var speed = "slow";
	
	$("#search-mod").slideUp(speed);
	$("#search-title").animate({"width":"90px","lineHeight":"24px","marginLeft":"45%"},speed)
		.css("border","1px solid #AAD5DE").css("cursor","pointer");
	$("#search-title span").prop("class","closeTitle");
	
	$("#search-title span").click(function(){
		if($(this).prop("class")=="closeTitle"){
			$("#search-mod").slideDown();
			$("#search-title").animate({"width":"100%","marginLeft":"12px"},speed)
				.css("border","none");
			$("#search-title span").prop("class","openTitle");
		} else if($(this).prop("class")=="openTitle"){
			$("#search-mod").slideUp(speed);
			$("#search-title").animate({"width":"90px","lineHeight":"24px","marginLeft":"45%"},speed) 
				.css("border","1px solid #AAD5DE").css("cursor","pointer");
			$("#search-title span").prop("class","closeTitle");
		}
	});
	
});